/**
 * Created by shenyinlin on 2018/6/24.
 */

import {Sprite} from "../base/Sprite.js";
import {DataStore} from "../base/DataStore.js";
    //排行按钮类,无语了. 这个类命名有问题 todo fixme
export class Back extends Sprite{



    constructor(){

        const image = Sprite.getImage('back');

        super(
            image,
            0,0,
            image.width,image.height,
            (DataStore.getInstance().canvas.width - image.width) / 2,
            (DataStore.getInstance().canvas.height/2.23),
            image.width,image.height
        );

        DataStore.getInstance().put('paiHangBtnY',(DataStore.getInstance().canvas.height/2.23));
        DataStore.getInstance().put('paiHangBtnX',(DataStore.getInstance().canvas.width - image.width) / 2);
        DataStore.getInstance().put('paiHangBtnWidth',image.width);
        DataStore.getInstance().put('paiHangBtnHeight',image.height);
    }

}